package com.zhihuiyanche.common.constant;

/**
 * 微信下单的订单类型
 *
 */
public enum DishOrderEnum
{
	SHOP_ORDER(0,"到店点餐"),
	TAKEOUT_ORDER(1,"外卖"),
	PICKUP_ORDER(2,"自取"),
	ARRANGE_ORDER(3,"排号"),
	RESERVE_ORDER(4,"预定桌位")
	;
	
	private int type;
	private String typeName;
	private DishOrderEnum(int type,String typeName){
		this.type = type;
		this.typeName = typeName;
	}
	public int getType()
	{
		return type;
	}
	public void setType(int type)
	{
		this.type = type;
	}
	public String getTypeName()
	{
		return typeName;
	}
	public void setTypeName(String typeName)
	{
		this.typeName = typeName;
	}
	
	public static DishOrderEnum getDishOrderEnum(int type){
		for (DishOrderEnum order : DishOrderEnum.values()) {
            if (order.getType() == type) {
                return order;
            }
        }
		return null;
	}
}
